package test;

import com.tycredit.util.AesEncrypt;

public class Encrypt {
    public static void main(String[] args) {
        String key = "34c9bc8f41afaabf";
        // 测试加密信息
        try {
            String str = AesEncrypt.encrypt("123456", key);
            System.out.print(str);

            // 解密字符串
            String decode = codeDecrypt(str);
            System.out.print(decode);
        }catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static String codeDecrypt(String decode) {
        String key = "34c9bc8f41afaabf";
        try {
            return AesEncrypt.decrypt(decode, key);
        }catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
